package com.ftg.learn.chapter10;

import java.util.Arrays;

public class Test1 {
    public int[] twoSum(int[] nums, int target) {
        System.out.println(Arrays.toString(nums));
        int[] a = new int[2];
        for(int i = 0;i<nums.length;i++){
            for(int j = 0;j <nums.length;j++){
                if(nums[i]+nums[j] == target){
                    a[0] = i;
                    a[1] = j;
                    System.out.println(i+" "+j);
                    System.out.println(Arrays.toString(a));
                    return a;
                }
            }
        }
        return a;
    }
}
